package work.jame.blog.pojo.dto;

import org.springframework.validation.annotation.Validated;
import work.jame.blog.framework.VerificationGroup;
import work.jame.blog.pojo.Comment;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author : Jame
 * @date : 2023-05-20 14:35
 **/
public class CommentDTO {

    /**
     * 评论本体
     */
    @NotNull(message = "评论内容不能为空",
            groups = {
                    VerificationGroup.Save.class,
                    VerificationGroup.Update.class
            }
    )
    @Valid //嵌套检查
    private Comment comment;

    /**
     * @ 的用户id集合
     */
    private List<Long> callUserIds;

    public Comment getComment() {
        return comment;
    }

    public void setComment(Comment comment) {
        this.comment = comment;
    }

    public List<Long> getCallUserIds() {
        return callUserIds;
    }

    public void setCallUserIds(List<Long> callUserIds) {
        this.callUserIds = callUserIds;
    }

    @Override
    public String toString() {
        return "CommentDTO{" +
                "comment=" + comment +
                ", callUserIds=" + callUserIds +
                '}';
    }
}
